import request from '@/config/axios'

// 收货地区手动 VO
export interface GlobeStateHarvestTwoVO {
  id: number // 收货地区详情id
  stateId: number // 国家id
  stateName: string // 国家名称
  methodId: number // 物流方式id
  methodName: string // 物流方式
  province: string // 省
  city: string // 城市
  area: string // 县/区
  creatorName: string // 创建者名称
}

// 收货地区手动 API
export const GlobeStateHarvestTwoApi = {
  // 查询收货地区手动分页
  getGlobeStateHarvestTwoPage: async (params: any) => {
    return await request.get({ url: `/trade/globe-state-harvest-two/page`, params })
  },

  // 查询收货地区手动详情
  getGlobeStateHarvestTwo: async (id: number) => {
    return await request.get({ url: `/trade/globe-state-harvest-two/get?id=` + id })
  },

  // 新增收货地区手动
  createGlobeStateHarvestTwo: async (data: GlobeStateHarvestTwoVO) => {
    return await request.post({ url: `/trade/globe-state-harvest-two/create`, data })
  },

  // 修改收货地区手动
  updateGlobeStateHarvestTwo: async (data: GlobeStateHarvestTwoVO) => {
    return await request.put({ url: `/trade/globe-state-harvest-two/update`, data })
  },

  // 删除收货地区手动
  deleteGlobeStateHarvestTwo: async (id: number) => {
    return await request.delete({ url: `/trade/globe-state-harvest-two/delete?id=` + id })
  },

  // 导出收货地区手动 Excel
  exportGlobeStateHarvestTwo: async (params) => {
    return await request.download({ url: `/trade/globe-state-harvest-two/export-excel`, params })
  },
}